<?php
require_once('config.php');

$id=$_GET['id'];
$password=$_GET['password'];
$telephone=$_GET['telephone'];

$sql="update userinfo set telephone='$telephone',password='$password' where id='$id'";

mysqli_query($conn,$sql);

$count=mysqli_affected_rows($conn);

// echo json_encode($count);

$obj=array();

if($count>0){
    $obj['code']=1;
    $obj['msg']='更新成功';
}else{
    $obj['code']=0;
    $obj['msg']='更新失败';
}
echo json_encode($obj);